.class Lcom/facebook/orca/roboguice/FragmentViewMembersInjector;
.super Ljava/lang/Object;
.source "FragmentViewListener.java"

# interfaces
.implements Lcom/google/inject/MembersInjector;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "<T:",
        "Ljava/lang/Object;",
        ">",
        "Ljava/lang/Object;",
        "Lcom/google/inject/MembersInjector",
        "<TT;>;"
    }
.end annotation


# instance fields
.field protected a:Ljava/lang/reflect/Field;

.field protected b:Lcom/facebook/orca/annotations/InjectFragmentView;


# direct methods
.method public constructor <init>(Ljava/lang/reflect/Field;Lcom/facebook/orca/annotations/InjectFragmentView;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 44
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 45
    iput-object p1, p0, Lcom/facebook/orca/roboguice/FragmentViewMembersInjector;->a:Ljava/lang/reflect/Field;

    .line 46
    iput-object p2, p0, Lcom/facebook/orca/roboguice/FragmentViewMembersInjector;->b:Lcom/facebook/orca/annotations/InjectFragmentView;

    .line 47
    return-void
.end method


# virtual methods
.method public a(Lcom/facebook/orca/roboguice/RoboFragment;Landroid/view/View;)V
    .locals 9
    .parameter
    .parameter

    .prologue
    const/4 v8, 0x2

    const/4 v7, 0x0

    const/4 v6, 0x1

    .line 55
    invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;

    .line 56
    invoke-static {p2}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;

    .line 58
    const/4 v0, 0x0

    .line 60
    :try_start_0
    iget-object v1, p0, Lcom/facebook/orca/roboguice/FragmentViewMembersInjector;->b:Lcom/facebook/orca/annotations/InjectFragmentView;

    invoke-interface {v1}, Lcom/facebook/orca/annotations/InjectFragmentView;->a()I

    move-result v1

    invoke-virtual {p2, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    .line 62
    if-nez v0, :cond_0

    .line 63
    new-instance v1, Ljava/lang/NullPointerException;

    const-string v2, "Can\'t inject null value into %s.%s when field is not @Nullable"

    const/4 v3, 0x2

    new-array v3, v3, [Ljava/lang/Object;

    const/4 v4, 0x0

    iget-object v5, p0, Lcom/facebook/orca/roboguice/FragmentViewMembersInjector;->a:Ljava/lang/reflect/Field;

    invoke-virtual {v5}, Ljava/lang/reflect/Field;->getDeclaringClass()Ljava/lang/Class;

    move-result-object v5

    aput-object v5, v3, v4

    const/4 v4, 0x1

    iget-object v5, p0, Lcom/facebook/orca/roboguice/FragmentViewMembersInjector;->a:Ljava/lang/reflect/Field;

    invoke-virtual {v5}, Ljava/lang/reflect/Field;->getName()Ljava/lang/String;

    move-result-object v5

    aput-object v5, v3, v4

    invoke-static {v2, v3}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v1
    :try_end_0
    .catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_1

    .line 70
    :catch_0
    move-exception v0

    .line 71
    new-instance v1, Ljava/lang/RuntimeException;

    invoke-direct {v1, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V

    throw v1

    .line 67
    :cond_0
    :try_start_1
    iget-object v1, p0, Lcom/facebook/orca/roboguice/FragmentViewMembersInjector;->a:Ljava/lang/reflect/Field;

    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Ljava/lang/reflect/Field;->setAccessible(Z)V

    .line 68
    iget-object v1, p0, Lcom/facebook/orca/roboguice/FragmentViewMembersInjector;->a:Ljava/lang/reflect/Field;

    invoke-virtual {v1, p1, v0}, Ljava/lang/reflect/Field;->set(Ljava/lang/Object;Ljava/lang/Object;)V
    :try_end_1
    .catch Ljava/lang/IllegalAccessException; {:try_start_1 .. :try_end_1} :catch_0
    .catch Ljava/lang/IllegalArgumentException; {:try_start_1 .. :try_end_1} :catch_1

    .line 79
    return-void

    .line 73
    :catch_1
    move-exception v1

    .line 74
    new-instance v1, Ljava/lang/IllegalArgumentException;

    const-string v2, "Can\'t assign %s value %s to %s field %s"

    const/4 v3, 0x4

    new-array v3, v3, [Ljava/lang/Object;

    if-eqz v0, :cond_1

    invoke-virtual {v0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v4

    :goto_0
    aput-object v4, v3, v7

    aput-object v0, v3, v6

    iget-object v0, p0, Lcom/facebook/orca/roboguice/FragmentViewMembersInjector;->a:Ljava/lang/reflect/Field;

    invoke-virtual {v0}, Ljava/lang/reflect/Field;->getType()Ljava/lang/Class;

    move-result-object v0

    aput-object v0, v3, v8

    const/4 v0, 0x3

    iget-object v4, p0, Lcom/facebook/orca/roboguice/FragmentViewMembersInjector;->a:Ljava/lang/reflect/Field;

    invoke-virtual {v4}, Ljava/lang/reflect/Field;->getName()Ljava/lang/String;

    move-result-object v4

    aput-object v4, v3, v0

    invoke-static {v2, v3}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v1

    :cond_1
    const-string v4, "(null)"

    goto :goto_0
.end method

.method public injectMembers(Ljava/lang/Object;)V
    .locals 0
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TT;)V"
        }
    .end annotation

    .prologue
    .line 51
    check-cast p1, Lcom/facebook/orca/roboguice/RoboFragment;

    invoke-virtual {p1, p0}, Lcom/facebook/orca/roboguice/RoboFragment;->a(Lcom/facebook/orca/roboguice/FragmentViewMembersInjector;)V

    .line 52
    return-void
.end method
